<!-- 用户信息-查看 -->
<template>
    <div class="app-container">
      <!-- <div class="title">基础信息</div> -->
      <!-- 基本信息 -->
      <div class="baseInfo">
        <div class="infoTitle">
          <span>基础信息</span>
          <!-- <span class="time">注册时间:{{curUserInfo.createTime}}</span> -->
        </div>
        <div class="infoContent">
          <el-form ref="baseInfoForm" :model="curUserInfo" :inline="true">
            <el-form-item label="用户头像:">
              <img :src="curUserInfo.userPhoto" :width="50" :height="50"/>
            </el-form-item>
            <el-form-item label="用户昵称:">
              {{curUserInfo.userNick}}
            </el-form-item>
            <el-form-item label="微信openid:" prop="openId">
              {{curUserInfo.openId}}
            </el-form-item>
          </el-form>
          <el-form :model="curUserInfo" :inline="true">
            <el-form-item label="姓名:">
              {{curUserInfo.userName}}
            </el-form-item>
            <el-form-item label="手机号:">
              {{curUserInfo.userPhone}}
            </el-form-item>
            <el-form-item label="性别:">
              {{curUserInfo.userSex}}
            </el-form-item>
            <el-form-item label="年龄:">
              {{curUserInfo.userAge}}
            </el-form-item>
          </el-form>
        </div>
      </div>
      <!-- 相应身份信息 -->
      <div class="hospitalInfo">
        <div class="infoTitle">
          <span>随访信息</span>
        </div>
        <div class="infoContent">
          <el-form ref="baseInfoForm" :model="curFllowupInfo" :inline="true">
            <el-form-item label="病案号:" class="wpre100">
              {{curFllowupInfo.caseId}}
            </el-form-item>
            <el-form-item label="主管医生:" >
              {{curFllowupInfo.managerDoctor}}
            </el-form-item>
            <el-form-item label="出院时间:" >
              {{curFllowupInfo.leaveTime}}
            </el-form-item>
            <el-form-item label="随访名称:" >
              {{curFllowupInfo.fllowupName}}
            </el-form-item>
            <el-form-item label="提交时间:" >
              {{curFllowupInfo.createTime}}
            </el-form-item>
          </el-form>
          <el-form>
            <el-form-item label="知晓状态:" >
            </el-form-item>
          </el-form>
          <el-form>
            <el-form-item style="margin-left: 50px;">
                <el-checkbox v-model="ifChecked" disabled></el-checkbox>
                <span>复查时间（已知晓）</span>
                <el-checkbox v-model="ifChecked" disabled></el-checkbox>
                <span>复查方式（已知晓）</span>
            </el-form-item>
            <el-form-item style="margin-left: 50px;">
                <el-checkbox v-model="ifChecked" disabled></el-checkbox>
                <span>换药时机（已知晓）</span>
                <el-checkbox v-model="ifChecked" disabled></el-checkbox>
                <span>康复动作（已知晓）</span>
            </el-form-item>
          </el-form>
        </div>
      </div>
      <div class="footerBtn">
        <el-button type="primary" @click="closeView">返 回</el-button>
      </div>
    </div>
  </template>
  
  <script>
  import { getDetailWithUser } from '@/api/user/fllowup.js'
  export default {
    name: 'FllowupDetail',
    data() {
      return {
        curUserInfo: {}, // 全部
        curFllowupInfo:{},
        ifChecked:true
      }
    },
    computed: {
      curId() {
        return this.$route.query.id
      }
    },
    created() {
      console.log(this.curId);
      this.getFllowupInfo()
    },
    methods: {
      // 获取详情
      getFllowupInfo() {
        getDetailWithUser(this.curId).then(res => {
          if (res.code === 200) {
            this.curUserInfo = res.userInfo
            this.curFllowupInfo = res.fllowupInfo
            // this.$forceUpdate()
          }
        })
      },
      // 确定
      closeView() {
        this.$router.back(-1);
      }
    }
  }
  </script>
  
  <style lang="scss" scoped>
    ::v-deep {
      .el-form-item {
        margin-bottom: 10px;
        margin-right: 80px;
      }
      .el-image {
        margin-right: 20px;
      }
    }
    .app-container {
      box-sizing: border-box;
      padding-right: 100px;
      padding-bottom: 50px;
      position: relative;
      min-height: 85vh;
      .wpre100 {
        width: 100%;
      }
    }
    .title {
      font-weight: 700;
      margin-bottom: 20px;
      text-align: left;
    }
    .infoTitle {
      display: flex;
      justify-content: space-between;
      .time {
        color: #666666;
        font-size: 12px;
      }
    }
    .infoContent {
      box-sizing: border-box;
      padding: 0 10px;
      border: 1px solid #d7d7d7;
      margin: 10px 0 20px;
    }
    .footerBtn {
      position: absolute;
      right: 100px;
      bottom: 20px;
    }
  </style>